#ifndef __LOGO_TOKEN_H__
#define __LOGO_TOKEN_H__

#ifdef __cplusplus
extern "C" 
{
#endif /*  __cplusplus */

typedef int token_t;

#define     TOKEN_INVALID        -1
#define     TOKEN_EOF            0


#define     BASE                 256

#define     TOKEN_RESET          1+BASE
#define     TOKEN_WAIT           2+BASE
#define     TOKEN_CLEAR          3+BASE
#define     TOKEN_HIDE           4+BASE
#define     TOKEN_LEARN          5+BASE
#define     TOKEN_FOR            6+BASE
#define     TOKEN_TO             7+BASE
#define     TOKEN_REPEAT         8+BASE
/*
 * Random, and inputwindow are routines,
 * instead of keywords.
 *
 */
/*#define     TOKEN_RANDOM         9+BASE*/
#define     TOKEN_WHILE          10+BASE 
#define     TOKEN_CANVASSIZE     11+BASE
#define     TOKEN_CANVASCOLOR    12+BASE
#define     TOKEN_PENCOLOR       13+BASE
#define     TOKEN_PENWIDTH       14+BASE
#define     TOKEN_GO             15+BASE
#define     TOKEN_DIRECTION      16+BASE
#define     TOKEN_TURNRIGHT      17+BASE
#define     TOKEN_TURNLEFT       18+BASE
#define     TOKEN_FORWARD        19+BASE
#define     TOKEN_BACKWARD       20+BASE
#define     TOKEN_FONTSIZE       21+BASE
#define     TOKEN_PRINT          22+BASE
#define     TOKEN_IF             23+BASE
#define     TOKEN_ELSE           24+BASE
#define     TOKEN_RETURN         25+BASE
#define     TOKEN_PENUP          26+BASE
#define     TOKEN_PENDOWN        27+BASE
#define     TOKEN_CENTER         28+BASE
#define     TOKEN_GOX            29+BASE
#define     TOKEN_GOY            30+BASE
#define     TOKEN_WRAPON         31+BASE
#define     TOKEN_WRAPOFF        32+BASE
#define     TOKEN_SHOW           33+BASE
#define     TOKEN_MESSAGE        34+BASE
#define     TOKEN_BREAK          35+BASE
#define     TOKEN_CONTINUE       36+BASE
/*==*/
#define     TOKEN_EQUAL          50+BASE
/* != */
#define     TOKEN_NOT_EQUAL      51+BASE
#define     TOKEN_LE             52+BASE
#define     TOKEN_GE             53+BASE
#define     TOKEN_AND            54+BASE
#define     TOKEN_OR             55+BASE
#define     TOKEN_NOT            56+BASE

#define     TOKEN_ID             100+BASE
#define     TOKEN_NUMBER         101+BASE
#define     TOKEN_STRING         102+BASE
#define     TOKEN_ERROR          200+BASE

#define     TOKEN_PLUS                  '+'
#define     TOKEN_MINUS                 '-'
#define     TOKEN_MUL                   '*'
#define     TOKEN_DIV                   '/'
#define     TOKEN_LT                    '<'
#define     TOKEN_GT                    '>'
#define     TOKEN_ASSIGN                '='
#define     TOKEN_COMMA                 ','
#define     TOKEN_LEFT_BRACKET          '('
#define     TOKEN_RIGHT_BRACKET         ')'
#define     TOKEN_LEFT_SQUARE           '['
#define     TOKEN_RIGHT_SQUARE          ']'
#define     TOKEN_COMPOUND_START        '{'
#define     TOKEN_COMPOUND_END          '}'
#define     COMPOUND_STMT        512+BASE
#define     ROUTINE_STMT         513+BASE

#ifdef __cplusplus
}
#endif /*  __cplusplus */

#endif /*__LOGO_TOKEN_H__ */

